ALTER TABLE dbo.Barcode
DROP CONSTRAINT FK_Barcode_InOutProdDetail
ALTER TABLE dbo.Barcode
ADD CONSTRAINT FK_Barcode_InOutProdDetail
FOREIGN KEY (InProdDetailId) REFERENCES dbo.InOutProdDetail(Id) ON DELETE CASCADE